<%#
  # WebROaR - Ruby Application Server - http://webroar.in/
  # Copyright (C) 2009  Goonj LLC
  #
  # This file is part of WebROaR.
  #
  # WebROaR is free software: you can redistribute it and/or modify
  # it under the terms of the GNU General Public License as published by
  # the Free Software Foundation, either version 3 of the License, or
  # (at your option) any later version.
  #
  # WebROaR is distributed in the hope that it will be useful,
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  # GNU General Public License for more details.
  #
  # You should have received a copy of the GNU General Public License
  # along with WebROaR.  If not, see <http://www.gnu.org/licenses/>.
  #%>

<br/>
<%if @application_name != SERVER_NAME%>
<div class='text_align_right'>Select Graph : <%=select :graph,:name,%w{URL-Breakup URL-Calls Database-Usage Throughput Resource-Usage},:selected=>session[:graph_type]%></div>
	<hr/>
	<div class='app_name'>Application Name : <%=@application_name%></div>
  <% unless ApplicationSpecification.analytics_enabled?(@application_name) %>
  <span class='error'>Analytics for this application is currently disabled. You can still view the reports on captured data.</span>
  <% end %>
	<hr/>
	<div id = 'graphs'>
		<%=render :partial => get_partial(session[:graph_type])%>
	</div>
	 <%=observe_field 'graph_name',:update => 'graphs',:url => {:action => 'get_next_graph', :id => @app_id, :time_slot => ""}, :with => 'graph_name' %>
<%else%>
	<hr/>
	<div class='app_name'>Application Name : <%=@application_name%></div>
	<hr/>
	<div id = 'graphs'>
		<%=render :partial => 'resource_usage_graph_server'%>
	</div>
<%end%>
<br/>
<br/>	